//
//  NetworkTools.h
//  one
//
//  Created by admin on 2023/10/12.
//

//#import <AFNetworking/AFNetworking.h>
#import <Foundation/Foundation.h>
#import <AFNetworking.h>

NS_ASSUME_NONNULL_BEGIN

//网络请求枚举
typedef enum : NSUInteger {
    GET,
    POST
} RequestMethod;
 
@interface NetworkTools : AFHTTPSessionManager

+(instancetype)sharedTools;

-(void) request:(RequestMethod)method URLString:(NSString *)URLString parameters:(nullable id)parameters finished:(void (^)(id result, NSError *error))finished;

-(void) request:(RequestMethod)method URLString:(NSString *)URLString parameters:(nullable id)parameters token:(NSString *)token finished:(void (^)(id result, NSError *error))finished;

@end

NS_ASSUME_NONNULL_END
